<template>
	<view class="content" v-if="pageShow">
		<u-navbar title="服务" placeholder leftIcon="">
			<view class="flexright xiaohui" style="font-size: 30rpx;color: #ff0000;" slot="right" @click="goAddService">
				点此添加</view>
		</u-navbar>
		<u-sticky>
			<!-- 搜索框 -->
			<!-- <view class="header ffffff paddinglr" :style="{paddingTop:systemBarHeight+'rpx'}">
				<view class="searchBox">
					<u-icon name="search" color="rgba(202, 202, 202, 1)" size="22"></u-icon>
					<input class="searchInput" placeholder-class="searchPlaceholder" type="text" placeholder="搜索关键字"
						confirm-type="search" @confirm="init()" v-model="keyword">
				</view>
			</view> -->
			<view class="ffffff paddinglr" style="margin-left: -15rpx;" v-if="tabflag">
				<u-tabs :list="tabList" @click="change" lineColor="rgba(243, 39, 28, 1)" :activeStyle="{
			    color: '#000000',
			    fontWeight: 800,
			    transform: 'scale(1.05)'}" :inactiveStyle="{
			    color: '#666666',
			    transform: 'scale(1)'
			}"></u-tabs>
			</view>
			<view class="padding fafafa flexbetween">
				<scroll-view class="scroll-view_H" scroll-x>
					<view class="flexleft">
						<view :class="index==active?'xuanzhong margin_right2':'weixuanzhong margin_right2'"
							v-for="(item,index) in tabList[tabActives].childList" :key="index"
							@click="changeNav(index)">
							{{item.name}}
						</view>
					</view>
				</scroll-view>
			</view>
			<!-- 视频、展示分类 -->
			<view class="padding fafafa flexbetween" v-if="tabActive==1&&active!=2">
				<scroll-view class="scroll-view_H" scroll-x>
					<view class="flexleft">
						<view :class="index==studyActive?'xuanzhong margin_right2':'weixuanzhong margin_right2'"
							v-for="(item,index) in tabList[tabActives].childList[active].childList" :key="index"
							@click="changeCate(index,item)">
							{{item.name}}
						</view>
					</view>
				</scroll-view>
			</view>
		</u-sticky>
		<!-- tab内容 -->
		<view class="paddinglr">
			<!-- 天问 -->
			<template v-if="tabActive!=1">
				<view class="margin_top">
					<view class="teacherBox" v-for="(item,index) in list.data" :key="item.id">
						<view class="flexleft">
							<view class="left">
								<image :src="item.image_text" mode=""></image>
							</view>
							<view class="right">
								<view class="name lianghang">{{item.name}}</view>
								<view class="flexbetween">
									<view class="price">￥{{item.price}}</view>
								</view>
							</view>
						</view>
						<view class="padding flexbetween margin_top">
							<view class="flexleft" @click="edit(item.id, '/pages_service/addService?id=')">
								<image class="imgEdit margin_right1" src="/static/image/mine/edit.png" mode=""></image>
								<view class="color_ling text_a">编辑</view>
							</view>
							<view class="flexleft" @click="updown(item)">
								<image class="imgSelf margin_right1" src="/static/image/home/shelf_top.png" mode=""
									v-if="item.status=='normal'"></image>
								<image class="imgSelf margin_right1" src="/static/image/home/shelf.png" mode=""
									v-if="item.status=='hidden'"></image>
								<view class="color_ling text_a">
									{{item.status=="normal"?"已上架":"已下架"}}
								</view>
							</view>
							<view class="flexleft" @click="del(item)">
								<image class="imgDelete margin_right1" src="/static/image/mine/delete.png" mode="">
								</image>
								<view class="color_ling text_a">删除</view>
							</view>
							<view class="flexleft" @click="goAllEval(item.id,2)">
								<image class="imgComm margin_right1" src="/static/image/home/comment.png" mode="">
								</image>
								<view class="color_ling text_a">评价</view>
							</view>
						</view>
					</view>
				</view>
				<view class="margin_top" v-if="tabActive==3&&active==1">
					<view class="ffffff margin_bottom3 border_2 padding" v-for="(item,index) in list.data"
						:key="item.id" @click="goForumInfo(item.id,2)">
						<view class="flexstart" v-if="item.user">
							<view style="margin-right: 20rpx;">
								<view class="image_ya">
									<image :src="item.user.avatar" mode=""></image>
								</view>
							</view>
							<view>
								<view class="text_g color_ling">{{item.user.nickname}}</view>
								<view class="year text_a  color_jiu">{{item.createtime_text}}</view>
							</view>
						</view>
						<view class="margin_top2 reward">
							标金：{{item.price}}元
						</view>
						<view class="margin_top text_w color_ling">{{item.title}}</view>
						<view class="margin_top2 text_w color_ling" style="font-weight: 400;">{{item.description}}
						</view>
						<view class="margin_top1 flexleft flex_wrap">
							<view class="forumBox" v-for="(value,i) in item.images_arr" :key="i">
								<image :src="value" mode=""></image>
							</view>
						</view>
						<view class="padding flexbetween">
							<view class="flexleft" @click.stop="studyEdit(item,'/pages_service/addProblem?id=')">
								<image class="imgEdit margin_right1" src="/static/image/mine/edit.png" mode=""></image>
								<view class="color_ling text_a">
									编辑
								</view>
							</view>
							<view class="flexleft" @click.stop="grounding(item.id)">
								<image class="imgSelf margin_right1" src="/static/image/home/shelf_top.png" mode=""
									v-if="item.status=='normal'"></image>
								<image class="imgSelf margin_right1" src="/static/image/home/shelf.png" mode=""
									v-if="item.status=='hidden'"></image>
								<view class="color_ling text_a">
									{{item.status=="normal"?"已上架":"已下架"}}
								</view>
							</view>
							<view class="flexleft" @click.stop="remove(item.id)">
								<image class="imgDelete margin_right1" src="/static/image/mine/delete.png" mode="">
								</image>
								<view class="color_ling text_a">
									删除
								</view>
							</view>
						</view>
					</view>
				</view>
			</template>
			<!-- 天学 -->
			<template v-if="tabActive==1">
				<!-- 视频 -->
				<view class="margin_top" v-if="active==0">
					<view class="ffffff margin_bottom3 border_2" v-for="(item,index) in list.data" :key="item.id"
						@click="goVideoInfo(item.id)">
						<view class="video" v-if="item.format==0">
							<image :src="item.image_text" mode=""></image>
						</view>
						<view class="videoFormat" :style="{backgroundImage:`url(${item.image_text})`}"
							v-if="item.format==1"></view>
						<view class="margin_top paddinglr color_ling text_a padding_bottom border_bottom_solid">
							{{item.title}}
						</view>
						<view class="padding flexbetween">
							<view class="flexleft" @click.stop="studyEdit(item,'/pages_service/addVideo?id=')">
								<image class="imgEdit margin_right1" src="/static/image/mine/edit.png" mode=""></image>
								<view class="color_ling text_a">编辑</view>
							</view>
							<view class="flexleft" @click.stop="grounding(item.id)">
								<image class="imgSelf margin_right1" src="/static/image/home/shelf_top.png" mode=""
									v-if="item.status=='normal'"></image>
								<image class="imgSelf margin_right1" src="/static/image/home/shelf.png" mode=""
									v-if="item.status=='hidden'"></image>
								<view class="color_ling text_a">
									{{item.status=="normal"?"已上架":"已下架"}}
								</view>
							</view>
							<view class="flexleft" @click.stop="remove(item.id)">
								<image class="imgDelete margin_right1" src="/static/image/mine/delete.png" mode="">
								</image>
								<view class="color_ling text_a">删除</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 展示 -->
				<view class="margin_top" v-if="active==1">
					<view class="ffffff margin_bottom3 border_2 padding" v-for="(item,index) in list.data"
						:key="item.id" @click="goForumInfo(item.id,1)">
						<view class="flexstart">
							<view style="margin-right: 20rpx;">
								<view class="image_ya">
									<image :src="item.user.avatar" mode=""></image>
								</view>
							</view>
							<view>
								<view class="text_g color_ling">{{item.user.nickname}}</view>
								<view class="year text_a  color_jiu">{{item.createtime_text}}</view>
							</view>
						</view>
						<view class="margin_top text_w color_ling">
							{{item.title}}
						</view>
						<view class="margin_top2 text_w color_ling" style="font-weight: 400;">
							{{item.description}}
						</view>
						<view class="margin_top1 flexleft flex_wrap">
							<view class="forumBox" v-for="(value,i) in item.images_arr" :key="i">
								<image :src="value" mode=""></image>
							</view>
						</view>
						<view class="padding flexbetween">
							<view class="flexleft" @click.stop="studyEdit(item,'/pages_service/addForum?id=')">
								<image class="imgEdit margin_right1" src="/static/image/mine/edit.png" mode=""></image>
								<view class="color_ling text_a">
									编辑
								</view>
							</view>
							<view class="flexleft" @click.stop="grounding(item.id)">
								<image class="imgSelf margin_right1" src="/static/image/home/shelf_top.png" mode=""
									v-if="item.status=='normal'"></image>
								<image class="imgSelf margin_right1" src="/static/image/home/shelf.png" mode=""
									v-if="item.status=='hidden'"></image>
								<view class="color_ling text_a">
									{{item.status=="normal"?"已上架":"已下架"}}
								</view>
							</view>
							<view class="flexleft" @click.stop="remove(item.id)">
								<image class="imgDelete margin_right1" src="/static/image/mine/delete.png" mode="">
								</image>
								<view class="color_ling text_a">
									删除
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 打赏抢答 -->
				<view class="margin_top" v-if="active==2">
					<view class="ffffff margin_bottom3 border_2 padding" v-for="(item,index) in list.data"
						:key="item.id" @click="goForumInfo(item.id,2)">
						<view class="flexstart">
							<view style="margin-right: 20rpx;">
								<view class="image_ya">
									<image :src="item.user.avatar" mode=""></image>
								</view>
							</view>
							<view>
								<view class="text_g color_ling">{{item.user.nickname}}</view>
								<view class="year text_a  color_jiu">{{item.createtime_text}}</view>
							</view>
						</view>
						<view class="margin_top2 reward">
							标金：{{item.price}}元
						</view>
						<view class="margin_top text_w color_ling">{{item.title}}</view>
						<view class="margin_top2 text_w color_ling" style="font-weight: 400;">{{item.description}}
						</view>
						<view class="margin_top1 flexleft flex_wrap">
							<view class="forumBox" v-for="(value,i) in item.images_arr" :key="i">
								<image :src="value" mode=""></image>
							</view>
						</view>
						<view class="padding flexbetween">
							<view class="flexleft" @click.stop="studyEdit(item,'/pages_service/addProblem?id=')">
								<image class="imgEdit margin_right1" src="/static/image/mine/edit.png" mode=""></image>
								<view class="color_ling text_a">
									编辑
								</view>
							</view>
							<view class="flexleft" @click.stop="grounding(item.id)">
								<image class="imgSelf margin_right1" src="/static/image/home/shelf_top.png" mode=""
									v-if="item.status=='normal'"></image>
								<image class="imgSelf margin_right1" src="/static/image/home/shelf.png" mode=""
									v-if="item.status=='hidden'"></image>
								<view class="color_ling text_a">
									{{item.status=="normal"?"已上架":"已下架"}}
								</view>
							</view>
							<view class="flexleft" @click.stop="remove(item.id)">
								<image class="imgDelete margin_right1" src="/static/image/mine/delete.png" mode="">
								</image>
								<view class="color_ling text_a">
									删除
								</view>
							</view>
						</view>
					</view>
				</view>
			</template>
			<view class="flexcenter placeholderBoxTop" v-if="!list.data.length">
				<image class="placeholderBox" src="/static/placeholderimg.png" mode=""></image>
			</view>
		</view>
		<!-- 加号 -->
		<view class="addBox" @click="goAdd" v-if="tabActive==1&&active!=2">
			<image src="../../static/image/home/add.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				pageShow: false,
				value: 0, //当前tab栏的索引
				active: 0,
				tabActive: 0,
				studyActive: 0,
				tabList: [{
					name: '天问',
					childList: []
				}, {
					name: '天学',
					childList: [{
							name: "视频",
							childList: []
						}, {
							name: "展示",
							childList: []
						},
						// {
						// 	name: "打赏抢答"
						// }
					]
				}, {
					name: '天心',
					childList: []
				}, {
					name: '天养',
					childList: []
				}, {
					name: '天聊',
					childList: [{
						name: "打赏抢答",
					}]
				}, {
					name: '天鉴',
					childList: []
				}, {
					name: '天融',
					childList: []
				}, ],
				isLoad: false,
				systemBarHeight: "",
				page: 1,
				limit: 12,
				list: {
					data: []
				},
				keyword: "",
				community_category_id: "", //视频、展示分类id
				tabflag: false,
				isvivo: false //是否是vivo
			}
		},
		watch: {
			tabActive() {
				this.active = 0
				this.init()
			}
		},
		computed: {
			tabActives() {
				if (!this.isvivo) {
					return this.tabActive
				} else {
					return 0
				}
			}
		},
		async onLoad() {
			this.systemBarHeight = getApp().globalData.systemBarHeight * 2 + 40
			// this.isvivo = this.getisvivo()
			// this.isvivo = true
			if (this.isvivo) {
				this.tabActive = 3
				this.tabList = [{
					name: '天养',
					childList: []
				}]
			}
			this.tabflag = true
			await this.getCateList()
			await this.getHomeInit()
		},
		onShow() {
			if (this.isLoad) {
				this.init()
			}
			this.$nextTick(() => {
				// 解决uview u-tab，下划线异常
				this.tabflag = false
				this.tabflag = true
			});
		},
		methods: {
			getisvivo() {
				const systemInfo = uni.getSystemInfoSync();
				const brand = systemInfo.brand.toLowerCase(); // 转为小写方便判断
				return brand.includes('vivo');
			},
			// 获取首页数据
			getHomeInit() {
				httpRequest.request("/api/index/index", "GET", {}).then(res => {
					this.isLoad = true
					if (!this.isvivo) {
						this.tabList[0].childList = res.data.service_tags.tags1 //天问子标签
						this.tabList[1].childList[0].name = res.data.community_type1_alias //天学子标签
						this.tabList[1].childList[1].name = res.data.community_type2_alias //天学子标签
						// this.tabList[6].childList[2].name = res.data.community_type3_alias //天学子标签
						this.tabList[2].childList = res.data.service_tags.tags2 //天心子标签
						this.tabList[3].childList = res.data.service_tags.tags3 //天养子标
						this.tabList[4].childList = res.data.service_tags.tags4 //天聊子标签
						this.tabList[5].childList = res.data.service_tags.tags5 //天鉴子标签
						this.tabList[6].childList = res.data.service_tags.tags6 //天融子标签
					} else {
						// this.tabList[0].childList[0].name = res.data.community_type1_alias //天学子标签
						// this.tabList[0].childList[1].name = res.data.community_type2_alias //天学子标签
						// this.tabList[1].childList = res.data.service_tags.tags2 //天心子标签
						this.tabList[0].childList = res.data.service_tags.tags3 //天养子标
						// this.tabList[2].childList = res.data.service_tags.tags4 //天聊子标签
						// this.tabList[3].childList = res.data.service_tags.tags5 //天鉴子标签
						// this.tabList[4].childList = res.data.service_tags.tags6 //天融子标签
					}
					this.init()
				})
			},
			getCateList() { //展示分类、视频分类
				let _this = this
				httpRequest.request('/api/community/getcategory', 'GET', {}).then(res => {
					if (res.code == 1) {
						if (!this.isvivo) {
							this.tabList[1].childList[0].childList = res.data.category1 //天学子标签
							this.tabList[1].childList[1].childList = res.data.category2 //天学子标签
							this.community_category_id = res.data.category1[0].id
						} else {
							// this.tabList[0].childList[0].childList = res.data.category1 //天学子标签
							// this.tabList[0].childList[1].childList = res.data.category2 //天学子标签
							// this.community_category_id = res.data.category1[0].id
						}
					} else if (res.code == 0) {
						httpRequest.toast(res.msg);
					} else {
						httpRequest.toast('网络开小差啦');
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			init(isPage, page) {
				let _this = this;
				let url = ""
				let data = {}
				let service_type = this.tabActive + 1
				let obj = {
					"0": "1",
					"2": "2",
					"3": "3",
					"4": "4",
					"5": "5",
					"6": "6",
				}
				let service_tags_id = ""
				service_tags_id = this.tabList[this.tabActives].childList[this.active].id
				if (this.tabActive != 1) {
					if (this.tabActive != 4 || (this.tabActive == 4 && this.active == 0)) {
						url = "/api/shop.service/getlist"
						data = {
							page: page || 1,
							service_type: obj[this.tabActive],
							keyword: this.keyword,
							service_tags_id
						}
					} else if (this.tabActive == 4 && this.active == 1) {
						url = "/api/community/getmylist"
						data = {
							page: page || 1,
							type: 3, // 类型:1=视频,2=论坛,3=打赏抢答
							service_type: 1, //类别:1=天聊,2=天学
						}
					}
				} else {
					url = "/api/community/getmylist"
					data = {
						page: page || 1,
						type: _this.active + 1, // 类型:1=视频,2=论坛,3=打赏抢答
						service_type: 2, //类别:1=天聊,2=天学
						community_category_id: this.community_category_id, //分类id
					}
				}
				httpRequest.request(url, 'GET', data, false, false, true).then(res => {
					if (res.code == 1) {
						if (this.tabActive == 1) {
							res.data.data.forEach((item, index) => {
								uni.getImageInfo({
									src: item.image_text,
									success(image) {
										if (Number(image.width) > Number(image.height)) { //横向
											_this.$set(item, "format", 0)
										} else { //竖向
											_this.$set(item, "format", 1)
										}
									}
								});
							})
						}
						let resList = res.data;
						let dataList = _this.list;
						if (isPage == true) {
							_this.list.data = dataList.data.concat(resList.data);
						} else {
							this.list = res.data
							_this.list.data = resList.data;
						}
						this.pageShow = true
					}

				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			onReachBottom() {
				let _this = this;
				let list = _this.list;
				let page = _this.page;
				if (list.last_page <= page) {
					return false;
				}
				page++;
				_this.page = page;
				_this.init(true, page);
			},
			// 编辑
			edit(val, url) {
				uni.navigateTo({
					url: url + val
				})
			},
			goAdd() { //发布视频
				if (this.tabActive == 1) {
					if (this.active == 0) {
						uni.navigateTo({
							url: "/pages_service/addVideo"
						})
					} else if (this.active == 1) {
						uni.navigateTo({
							url: "/pages_service/addForum"
						})
					}
				}
			},
			studyEdit(item, url) { //天学编辑
				if (item.status == "normal") {
					httpRequest.toast("已上架，不能编辑！")
					return false
				}
				uni.navigateTo({
					url: url + item.id
				})
			},
			// 删除服务
			del(item) {
				httpRequest.modal('提示', '请再次确认', true, (res) => {
					if (res) {
						httpRequest.request('/api/shop.service/del', 'POST', {
							id: item.id,
						}).then(res => {
							httpRequest.toast(res.msg)
							if (res.code == 1) {
								this.init()
							}
						})
					}
				})
			},
			// 上下架
			updown(item) {
				httpRequest.modal('提示', '请再次确认', true, (res) => {
					if (res) {
						httpRequest.request('/api/shop.service/updown', 'POST', {
							id: item.id,
						}).then(res => {

							if (res.code == 1) {
								if (item.status == "normal") {
									httpRequest.toast("下架成功")
								} else {
									httpRequest.toast("上架成功")
								}
								this.init()
							} else {
								httpRequest.toast(res.msg)
							}
						})
					}
				})
			},
			grounding(id) { //上下架视频、展示、打赏抢答
				let _this = this;
				httpRequest.modal('提示', '请再次确认', true, (resp) => {
					if (resp) {
						httpRequest.request('/api/community/updown', 'POST', {
							id
						}, false, false, true).then(res => {
							if (res.code == 1) {
								httpRequest.toast(res.msg);
								_this.init()
							} else {
								httpRequest.toast(res.msg);
							}
						}).catch(err => {
							httpRequest.toast(err.msg);
						})
					}
				})
			},
			remove(id) { //删除视频、展示、打赏抢答
				let _this = this;
				httpRequest.modal('提示', '请再次确认', true, (resp) => {
					if (resp) {
						httpRequest.request('/api/community/del', 'POST', {
							id
						}, false, false, true).then(res => {
							if (res.code == 1) {
								httpRequest.toast(res.msg);
								_this.init()
							} else {
								httpRequest.toast(res.msg);
							}
						}).catch(err => {
							httpRequest.toast(err.msg);
						})
					}
				})
			},
			changeNav(index) { //导航栏切换
				this.active = index
				if (this.tabActive == 1 && this.active != 2) {
					this.studyActive = 0
					this.community_category_id = this.tabList[this.tabActives].childList[this.active].childList[this
						.studyActive].id
				}
				this.init()
			},
			changeCate(index, item) { //视频、展示分类切换
				this.studyActive = index
				this.community_category_id = item.id
				this.init()
			},
			change(e) { //tab栏切换
				this.active = 0
				if (!this.isvivo) {
					this.tabActive = e.index
				}
			},
			goAddService() { //添加服务
				uni.navigateTo({
					url: "/pages_service/addService"
				})
			},
			goAllEval(id) { //评价
				uni.navigateTo({
					url: "/pages_service/allEval?type=2&id=" + id
				})
			},
			goSearch() { //搜索商品
				uni.navigateTo({
					url: "/pages_service/search"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	// 加号
	.addBox {
		width: 92rpx;
		height: 92rpx;
		position: fixed;
		right: 0;
		top: 50%;
		transform: translateY(-50%);

		image {
			width: 100%;
			height: 100%;
		}
	}

	.noSelect {
		width: 118rpx;
		height: 53rpx;
		line-height: 53rpx;
		text-align: center;
		background: #EFEFEF;
		border: 1rpx solid #EFEFEF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
	}

	.select {
		width: 118rpx;
		height: 53rpx;
		line-height: 53rpx;
		text-align: center;
		background: rgba(243, 39, 28, 0.1);
		border: 1rpx solid #F3271C;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #F3271C;
	}

	.video {
		height: 353rpx;

		image {
			width: 100%;
			height: 100%;
			border-radius: 12rpx 12rpx 12rpx 12rpx;
		}
	}

	.videoFormat {
		height: 653rpx;
		background-repeat: no-repeat;
		background-position: center;
		-webkit-background-size: cover;
		-moz-background-size: cover;
		-o-background-size: cover;
		background-size: cover;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		// height: 653rpx;
		// image {
		// 	width: 100%;
		// 	height: 100%;
		// 	border-radius: 12rpx 12rpx 12rpx 12rpx;
		// }
	}

	.imgBox {
		width: 100%;
		height: 353rpx;
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		overflow: hidden;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.content {
		padding-bottom: 100rpx;
	}

	// tab栏
	.tab1 {
		width: 44rpx;
		height: 41rpx;
	}

	.tab2 {
		width: 41.58rpx;
		height: 41.58rpx;
	}

	.tab3 {
		width: 42.12rpx;
		height: 36.85rpx;
		margin-top: 5rpx;
		margin-bottom: 5rpx;
	}

	.tab4 {
		width: 42rpx;
		height: 42rpx;
	}

	// tab结束
	.imgJia {
		width: 36rpx;
		height: 36rpx;
	}

	.backFA {
		background-color: #FAFAFA;
	}

	body {
		background-color: #FAFAFA;
	}

	// 搜索框
	.header {
		// margin-top: 96rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.searchBox {
		padding: 18rpx 30rpx;
		background: #F3F3F3;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
		display: flex;
		align-items: center;
		flex: 1;

		.searchInput {
			margin-left: 20rpx;
			font-size: 24rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #000000;
		}

		.searchPlaceholder {
			font-size: 24rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #C5C5C5;
		}
	}

	// 导航栏
	.scroll-view_H {
		white-space: nowrap;
		width: 100%;
	}

	.weixuanzhong {
		padding: 10rpx 35rpx;
		background: #EFEFEF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 1rpx solid #EFEFEF;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
	}

	.xuanzhong {
		padding: 10rpx 35rpx;
		background: rgba(243, 39, 28, 0.1);
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 1rpx solid #F3271C;
		font-size: 24rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #F3271C;
	}

	// 天问
	.teacherBox {
		background-color: #ffffff;
		padding: 36rpx 15rpx 36rpx 30rpx;
		margin-bottom: 30rpx;
		// display: flex;

		.left {
			width: 140rpx;
			height: 140rpx;
			border-radius: 8rpx 8rpx 8rpx 8rpx;
			margin-right: 30rpx;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.right {
			height: 140rpx;
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			flex: 1;

			.name {
				font-size: 30rpx;
				font-family: PingFang SC-Heavy, PingFang SC;
				font-weight: 500;
				color: #333333;
			}

			.price {
				font-size: 28rpx;
				font-family: PingFang SC-Heavy, PingFang SC;
				font-weight: 800;
				color: #F3271C;
			}
		}
	}

	.imgEdit {
		width: 18.67rpx;
		height: 24.27rpx;
		display: block;
	}

	.imgSelf {
		width: 21rpx;
		height: 21.84rpx;
		display: block;
	}

	.imgDelete {
		width: 23.33rpx;
		height: 24.27rpx;
		display: block;
	}

	.forumBox {
		width: 33.3%;
		height: 194rpx;
		border-radius: 15rpx 15rpx 15rpx 15rpx;
		overflow: hidden;
		display: flex;
		justify-content: center;

		image {
			width: 193rpx;
			height: 100%;
			border-radius: 15rpx 15rpx 15rpx 15rpx;
		}
	}

	.image_ya {
		width: 77rpx;
		height: 77rpx;
		border-radius: 50%;

		image {
			width: 100%;
			height: 100%;
			border-radius: 50%;
		}
	}

	.imgComm {
		width: 28rpx;
		height: 28rpx;
		display: block;
	}
</style>